function fixmcs=fixMCS(mcs)
    global D TBS KS;
    temp=mcs;
    for i=1:KS
        rb=TBS(:,ceil(abs(temp(i))));
        while max(rb)<D(i)
           temp(i)=temp(i)+1;
           rb=TBS(:,ceil(abs(temp(i))));
           if(temp(i)>27)
               disp(temp(i));
           end
        end
    end
    fixmcs=temp;
end